url = 'https://www.acwing.com/problem/content/4944/'

a = int(input())

a_bin = bin(a)[2:]

res = 0
for i in a_bin:
    res += int(i) & 1

print(res)
